package com.xiaoyu.base.event;

import org.greenrobot.eventbus.EventBus;

import in.srain.cube.app.lifecycle.LifeCycleComponentManager;

public class AppEventBus {

    public static EventBus getInstance() {
        return EventBus.getDefault();
    }

    public static SimpleEventHandler bindContainerAndHandler(Object container, SimpleEventHandler handler) {
        LifeCycleComponentManager.tryAddComponentToContainer(handler, container);
        return handler.tryToRegisterIfNot();
    }
}
